const fs = require('fs')
const path = require('path')

const modules = {}

const fileList = fs.readdirSync(path.resolve(__dirname, './modules'))

fileList.forEach((file) => {
    let fileName = file.split('.')[0]
    let value = require(path.resolve(__dirname, './modules', fileName))
    modules[fileName] = value
})

module.exports = modules